# -*- coding: utf-8 -*-
# __author__ = "maple"
from rest_framework import serializers
from .models import Banner,Nav
class BannerModelSerializer(serializers.ModelSerializer):
    '''
    轮播图序列化器
    '''
    class Meta:
        model = Banner
        fields = ['image','link']

class NavModelSerializer(serializers.ModelSerializer):
    '''
    轮播图序列化器
    '''
    class Meta:
        model = Nav
        fields = ['name','link','position','is_http']